import XLSX, { WorkSheet } from 'xlsx';

export const exportExcel = (id: string, sheetName: string, excelName: string) => {
	let worksheet: WorkSheet = XLSX.utils.table_to_sheet(document.getElementById(id));
	let workbook = XLSX.utils.book_new();
	XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);
	XLSX.writeFile(workbook, excelName);
};
